package routes

import (
	"github.com/kataras/iris/v12"
	"irisdemo/controllers"
	"irisdemo/middleware"
)

func InitApiRoute(app *iris.Application) {

	api := app.Party("/api", middleware.ApiAuth)
	{
		api.Get("/", controllers.Index.Index)
		api.Post("/user/login", controllers.User.Login)
		api.Post("/user/del", controllers.User.DelUser)
	}
}
